Added enum contract#181
Conversation
lib/contracts/builtin_contracts.rb
Outdated
There was a problem hiding this comment.
Can you break the comment at 80 characters?
Can you add an example like this # Example: <tt>Enum[:a, :b, :c]</tt>?
|
Can you provide short description for this Pull Request? Can you add it to list of builtin contracts in |
|
Fixed. |
|
Can you prepare a new release? Are you going to follow semver? I saw that your version number has only two digits.... |
|
Yes I do want it. But I do not know if @egonSchiele is ok with that. Actually I have bumped to |
TUTORIAL.md
Outdated
There was a problem hiding this comment.
Typo in links title: RangeOf => Enum
There was a problem hiding this comment.
Typo in example: ; => ,
|
Nice contract! Just waiting on responses to @alex-fedorov 's comments before I merge. I agree we should switch to semver. |
|
Fixed. Sorry for the mistakes. |
|
@dg-ratiodata no problem :) LGTM, merging |
|
Thanks @dg-ratiodata! Do you need this to be released right away or this can wait? |
|
This one can wait. I've got a custom contract for that. The same is true for the PR I filed some minutes ago. |
I use contracts.ruby within a configuration class. Some options only allows a given subset of values - symbols. I added a custom contract for that, but thought it might be valueable for others as well.